<template>
	<!-- 教师 活动库详情 -->
	<view class="page">
		<view class="flex benben-position-layout flex flex-wrap align-center flex_0_ibhf"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
			<view class='flex flex-wrap align-center justify-between flex-sub fd0_0_ibhf'>
				<view class='flex flex-wrap align-center fd0_0_c0_ibhf' @tap.stop="handleJumpDiy" data-type="back"
					data-url="1">
					<text class='fu-iconfont2  fd0_0_c0_c0_ibhf'>&#xE794;</text>
				</view>
				<view class='flex flex-wrap align-stretch justify-center'>
					<text class='fd0_0_c1_c0_ibhf'>课堂活动</text>
				</view>
				<view class='flex flex-wrap align-center justify-end fd0_0_c0_ibhf'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<view class="hp"></view>
		<view class="content">
			<view class='flex flex-wrap align-center justify-between fd1_1_c0_ibhf'>
				<view class='flex flex-direction flex-wrap align-stretch justify-between flex-sub'>
					<view class="fd1_1_c0_c0_c0_ibhf flex">{{name}}</view>
					<view>名称：{{infos.name}}</view>
					<view>限时：{{infos.limited_time}}{{infos.time_type_name}}</view>
					<view>创建人：{{infos.create_id_name}}</view>
				</view>
			</view>
			<!-- 随堂测试 -->
			<view class="tmlist" v-if="name=='随堂测试'">
				<view class="title">
					测试题目
				</view>
				<view class='flex flex-direction flex-wrap align-stretch list_fd2_0_ibhf'    v-for="(items,indexs) in listyxt" :key='indexs'>
					<view class='flex flex-wrap align-center list_fd2_0_c0_ibhf'>
						<text>{{indexs + 1}}、</text>
						<view class='flex fl ex-wrap align-center list_fd2_0_c0_c1_ibhf'>
							<text class='list_fd2_0_c0_c1_c0_ibhf' v-html="items.question_type_name"></text>
						</view>
					</view>
					<view class='flex flex-wrap align-center'>
						<text v-html="items.question_title"></text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name: '主题讨论',
				popupShow1758159673073: false,
				inputname: '输入1-100',
				inputone: '',
				aid:'',//
				infos:{},
				listyxt:[],
				"pickerDiy1763618496046": false,
				"corelist": [],
				"checkname": "",
				"checkid": ""
				
			}
		},
		onLoad(option) {
			this.name = option.name
			this.aid=option.aid
			this.getscore()
			this.getinfo()
		},
		methods: {
			getscore(){
				const arr2 = [...Array(21).keys()].map(i => ({
				  name: (i - 10).toString()
				}));
				console.log(arr2);
				this.corelist=arr2
			},
			async getinfo(){
				let res = await this.$api.post(global.apiUrls.post6916d3b7ea8da, {
					aid: this.aid,
				});
				if (res.data.code != 1) {
					this.$message.info(res.data.msg);
					return
				}
				this.infos=res.data.data
				if(this.name=='随堂测试'){
					this.getlist()
				}
				console.log(res.data.data)
			},
			async getlist(){
				let res = await this.$api.post(global.apiUrls.post68de4b1f5b9c8, {
						homework_id: this.infos.info.aid,
				});
				if (res.data.code != 1) {
					this.$message.info(res.data.msg);
					return
				}
				this.listyxt=res.data.data
				console.log(res.data.data)
			},
			async editfen() {
				if (!this.inputone) {
					this.$message.info('请输入分数')
					return
				}
				let url=global.apiUrls.post68f090830e25b
				if(this.type==3){
					url=global.apiUrls.post68e77bea9e159
				}
				let res = await this.$api.post(url, {
					aid: this.examObj.aid,
					score: this.inputone,
				});
				this.examObj.score = this.inputone
				this.list[this.examIndex].score = this.inputone
			
				if (res.data.code != 1) {
					this.$message.info(res.data.msg);
					return
				}
				this.popupShow1758159673073 = false
				this.$message.info('打分成功')
				if(this.type==3){
					this.get_exam_list()
				}else{
					this.get_exam_resolution()
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #ffffff;
		background-size: 100% auto;
		.hp{
			width: 100%;
			height: 24rpx;
			background-color: #F3F4F8;
		}
		.flex_0_ibhf {
			width: 750rpx;
			height: 88rpx;
			overflow: hidden;
			z-index: 10;
			top: 0rpx;
			background: #fff;
			background-size: 100% auto !important;

			.fd0_0_ibhf {
				padding: 0rpx 32rpx 0rpx 32rpx;

				.fd0_0_c1_c0_ibhf {
					font-size: 36rpx;
					font-weight: 700;
					color: #333333;
					line-height: 50rpx;
				}
			}

			.fd0_0_c0_ibhf {
				width: 120rpx;

				.fd0_0_c0_c0_ibhf {
					font-size: 36rpx;
					color: #333;
				}
			}
		}

		.content {
			// margin-top: 32rpx;
			background-color: #fff;

			.fd1_1_c0_ibhf {

				// border-bottom: 1px solid #eee;
				border-radius: 16rpx;
				// margin-top: 24rpx;
				padding: 32rpx 24rpx 0 24rpx;
				color: #999999;
				font-size: 24rpx;

				view {
					margin-bottom: 20rpx;
				}
				.fd1_1_c0_c0_c0_ibhf {
					font-size: 32rpx;
					color: #333333;
					margin: 0rpx 0rpx 40rpx 0rpx;
				}
			}

			

			.tmlist {
				border-top: 1rpx solid #eeeeee;

				.title {
					color: #1C5EFC;
					padding: 24rpx;

					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 32rpx;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}
				.list_fd2_0_ibhf {
					// margin: 24rpx;
					padding: 24rpx;
					// background-color: #ffffff;
					border-bottom: 1px solid #eee;
					// border-radius: 16rpx;
					margin-bottom: 24rpx;
				
					.list_fd2_0_c0_ibhf {
						margin: 0rpx 0rpx 12rpx 0rpx;
				
						.list_fd2_0_c0_c1_ibhf {
							background: #5695F7;
							height: 40rpx;
							border-radius: 8rpx;
							padding: 0rpx 10rpx 0rpx 10rpx;
							margin: 0rpx 0rpx 0rpx 20rpx;
				
							.list_fd2_0_c0_c1_c0_ibhf {
								color: #ffffff;
								font-size: 24rpx;
								line-height: 40rpx;
							}
						}
					}
				}
			}

		}
		.zttl{
			.hp{
				height: 24rpx;
				background-color: #F3F4F8;
				width: 100%;
			}
			.title{
				width: 100%;
				height: 72rpx;
				background: #FBFBFB;
				border-radius: 0px 0px 0px 0px;
				padding:14rpx 24rpx;
				.left{
					
					height: 44rpx;
					font-family: Source Han Sans CN, Source Han Sans CN;
					font-weight: 400;
					font-size: 30rpx;
					color: #999999;
					line-height: 44rpx;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}
				.right{
					width: 132rpx;
					height: 44rpx;
					background: #145EFD;
					border-radius: 8rpx;
					color: #fff;
					margin-left: auto;
				}
			}
			
		}
		.lists{
			padding: 36rpx 0;
			background-color: #ffffff;
			.item{
				padding: 0 24rpx;
				margin-bottom: 52rpx;
				display: flex;
			}
			.user{
				.imgs{
					width: 72rpx;
					height: 72rpx;
					border-radius:50%;
						margin-top: 85rpx;
					}
				.name{
					font-family: Source Han Sans CN, Source Han Sans CN;
					font-weight: 400;
					font-size: 26rpx;
					color: #666666;
					line-height: 37px;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}
			}
			.info{
				width: 610rpx;
				min-height: 228rpx;
				// background-color: red;
				// background-image: url("@/static/images/tlbj2.png");
				// background-size: 105rpx 43rpx;
				// background-repeat: no-repeat;
				// background-color: red;
				position: relative;
				margin-left: 17rpx;
				// background-color: pink;
				// box-shadow: 0  0 10rpx 5rpx rgba(0,0,0,0.1);
				box-shadow: 0px 0px 20px 1px rgba(148,167,204,0.16);
				.tlbj{
					width: 100%;
					height: 100%;
					position: absolute;
					top: 0;
					left: 0;
					// box-shadow: 0px 0px 20px 1px rgba(148,167,204,0.16);
				}
				.infos{
					// box-shadow: 0px 0px 20px 1px rgba(148,167,204,0.16);
					padding:24rpx 37rpx;
					width: 100%;
					height: 100%;
					position: absolute;
					top: 0;
					left: 0;
					z-index: 3;
					color: #999999;
					border-radius: 10rpx;
					
					.names{
						
						font-family: Source Han Sans CN, Source Han Sans CN;
						font-weight: 500;
						font-size: 32rpx;
						color: #333333;
						line-height: 45rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
					}
					.bttom{
						margin-top: 48rpx;
					
						font-family: Source Han Sans CN, Source Han Sans CN;
						font-weight: 400;
						font-size: 28rpx;
						color: #999999;
						line-height: 40rpx;
						text-align: left;
						font-style: normal;
						text-transform: none;
						.zt{
							margin-left: auto;
							color:#29BE9E;
						}
						.pf{
							margin-left: auto;
							color: #145EFD;
						}
					}
				}
			}
		}
	}
	.zy_picker4_0_ibhf {
		background-color: #ffffff;
	    padding: 0rpx 32rpx 0rpx 32rpx;
	    line-height: 88rpx;
	    border-bottom: 1px solid #eee;
	
	    .zy_picker4_0_c0_ibhf {
	        color: var(--benbenFontColor2);
	    }
	
	    .zy_picker4_0_c1_ibhf {
	        color: var(--benbenFontColor0);
	    }
	
	    .zy_picker4_0_c2_ibhf {
	        color: var(--benbenFontColor4);
	    }
	}
	.list_flex_2_ibhf {
		width: 750rpx;
		height: 84rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(84rpx + var(--window-bottom));
	
		.list_fd2_0_ibhf {
			border-radius: 12rpx;
			width: 702rpx;
			line-height: 84rpx;
			font-size: 24rpx;
			background: #4781f5;
			color: #fff;
		}
	}
	.people_flex_3_ibhf {
		width: 622rpx;
		// margin: 0rpx 0rpx 0rpx 64rpx;
	
		.people_fd3_0_ibhf {
			background: #FFFFFF;
			width: 622rpx;
			height: 530rpx;
			border-radius: 16rpx;
	
			.people_fd3_0_c0_ibhf {
				margin: 48rpx 0rpx 48rpx 0rpx;
	
				.people_fd3_0_c0_c0_ibhf {
					font-size: 36rpx;
					color: #333;
					font-weight: 600;
				}
			}
	
			.people_fd3_0_c3_ibhf {
				color: var(--benbenFontColor3);
				font-size: 32rpx;
				margin-top: 100rpx;
	
				.people_fd3_0_c3_c0_ibhf {
					background: #F4F8FD;
					width: 240rpx;
					height: 88rpx;
					margin: 0rpx 44rpx 0rpx 0rpx;
					border-radius: 44rpx;
					color: rgba(20, 94, 253, 1);
					font-size: 32rpx;
				}
	
				.people_fd3_0_c3_c1_ibhf {
					background: #145EFD;
					width: 240rpx;
					height: 88rpx;
					border-radius: 44rpx;
					color: #fff;
				}
			}
	
			.people_fd3_0_c1_ibhf {
				border: 1px solid #F2F4F7;
				background: #F6F7FA;
				width: 526rpx;
				height: 84rpx;
				margin: 0rpx 0rpx 24rpx 0rpx;
				border-radius: 12rpx;
				padding: 0 24rpx;
			}
		}
	}
</style>
